from google.appengine.ext import db

class Group(db.Model):
    NAME = db.StringProperty(required=True)
    URL = db.LinkProperty(required=True)
    TAGS = db.ListProperty(str)


from google.appengine.ext import db
from google.appengine.tools import bulkloader


class GroupLoader(bulkloader.Loader):
  def __init__(self):
    bulkloader.Loader.__init__(self, 'Group',
                                     [('NAME', lambda x:x.decode('utf-8')),
                                      ('URL', db.Link),
                                      ('TAGS', lambda x: [v.decode('utf-8') for v in x.split(':')])
                                     ])

loaders = [GroupLoader]
